package cn.imnaer.service.rest.view.model;

import cn.imnaer.service.persistence.model.PushMessage;

public class FriendCircleMessage {
	private 	String friendCircleMessageId ;
	private 	String type ; 
	private 	String userId ;
	private 	String userName;
	private 	String contentType;
	private 	String content;
	private 	String time;
	private 	String image;
	public String getFriendCircleMessageId() {
		return friendCircleMessageId;
	}
	public void setFriendCircleMessageId(String friendCircleMessageId) {
		this.friendCircleMessageId = friendCircleMessageId;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getUserId() {
		return userId;
	}
	public void setUserId(String userId) {
		this.userId = userId;
	}
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	public String getContentType() {
		return contentType;
	}
	public void setContentType(String contentType) {
		this.contentType = contentType;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public String getTime() {
		return time;
	}
	public void setTime(String time) {
		this.time = time;
	}
	public String getImage() {
		return image;
	}
	public void setImage(String image) {
		this.image = image;
	}

   public static  FriendCircleMessage  parse(PushMessage  message){
	   FriendCircleMessage  friendMessage=new FriendCircleMessage();
	   friendMessage.setContent(message.getContent());
	   friendMessage.setContentType(message.getMessageType());
	   friendMessage.setType(message.getIdType());
	   friendMessage.setImage(message.getImage());
	   friendMessage.setFriendCircleMessageId(message.getId());
	   friendMessage.setUserName(message.getUserName());
	   friendMessage.setTime(String.valueOf(message.getCreateTime()));
	   friendMessage.setUserId(message.getSender());
	   return  friendMessage;
	   
   }
}
